package com.guli.educenter.controller;


import com.guli.common.result.Result;
import com.guli.educenter.service.UcenterMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 会员表 前端控制器
 * </p>
 *
 * @author guli
 * @since 2020-06-04
 */
@RestController
@RequestMapping("/educenter/member")
@CrossOrigin
public class UcenterMemberController {

    @Autowired
    private UcenterMemberService memberService;

    // 统计某一天的注册人数
    @GetMapping("countRegister/{day}")
    public Result countRegisterNum(@PathVariable String day){

        Integer count = memberService.registerCountNum(day);

        return Result.ok().data("registerNum", count);
    }

}

